﻿Imports System.Net
Public Class UpdateVersionGetter
    Public Shared Function GetRemoteAsArray(ByVal URL As String)
        Dim RemoteData As String
        Dim Web As New WebClient
        RemoteData = Web.DownloadString(URL)
        Dim words As String() = RemoteData.Split(New Char() {","c})
        Return words
    End Function

    Public Shared Function GetRemoteAsString(ByVal URL As String)
        Dim RemoteData As String
        Dim Web As New WebClient
        RemoteData = Web.DownloadString(URL)
        Return RemoteData
    End Function

    Public Shared Function GetRemoteAsSetOfValues(ByVal URL As String)
        Dim RemoteData As String
        Dim Web As New WebClient
        RemoteData = Web.DownloadString(URL)
        Dim words As String() = RemoteData.Split(New Char() {","c})

        Dim VersionNum As Integer = words.ElementAt(0)
        Dim VersionName As String = words.ElementAt(1)
        Dim VersionURL As String = words.ElementAt(2)

        Return VersionNum
        Return VersionName
        Return VersionURL
    End Function
End Class
